<template>

       
  <div id="myChart" :style="{width: '400px', height: '300px'}"></div>

</template>

<style></style>

<script>

  export default {
    name: 'hello',
    data () {
      return {
        msg: ''
      }
    },
    mounted(){
      this.drawLine();
    },
    methods: {
      drawLine(){
        // 基于准备好的dom，初始化echarts实例
        let myChart = this.$echarts.init(document.getElementById('myChart'))
        // 绘制图表
        myChart.setOption({
          title: { text: '近7天接口用例统计:' },
          tooltip: {},
          xAxis: {
            data: []
          },
          yAxis: {},
          series: [{
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20]
          }]
        });
      }
    }
  }


</script>
